package com.design.pattern.decorator.battercake;

/**
 * @version 1.0
 * @author: CRM_SYSTEM
 * @date: 2022/10/13 22:39
 * @Description:
 */
public class TestDemo {
    public static void main(String[] args) {
        BatterCake batterCake;
        batterCake=new BaseBatterCake();
        System.out.println(batterCake.getMsg()+"价格="+batterCake.getPrice());

        batterCake=new EggDecorator(batterCake);
        System.out.println(batterCake.getMsg()+"价格="+batterCake.getPrice());

        batterCake=new EggDecorator(batterCake);
        System.out.println(batterCake.getMsg()+"价格="+batterCake.getPrice());

        batterCake=new SauageDecorator(batterCake);
        System.out.println(batterCake.getMsg()+"价格="+batterCake.getPrice());


    }
}
